//
//  TopLeftLabel.m
//  LabelShow
//
//  Created by 曾墨 on 16/9/20.
//  Copyright © 2016年 YuanJiang. All rights reserved.
//

//继承
#import "TopLeftLabel.h"

@implementation TopLeftLabel
-(id)initWithFrame:(CGRect)frame
{
    return [super initWithFrame:frame];
}
-(CGRect) textRectForBounds:(CGRect)bounds limitedToNumberOfLines:(NSInteger)numberOfLines
{
    CGRect textRect =[super textRectForBounds:bounds limitedToNumberOfLines:numberOfLines];
    textRect.origin.y=bounds.origin.y;
    return textRect;
    
}
-(void)drawTextInRect:(CGRect)rect
{
    CGRect acturalRect = [self textRectForBounds:rect limitedToNumberOfLines:self.numberOfLines];
    [super drawTextInRect:acturalRect];
}



@end
